version: "2.1"
services:
  leanote:
    image: r0wbh/leanote:latest
    # build:
    #   context: .
    #   dockerfile: Dockerfile
    volumes:
      - "./conf/app.conf:/go/src/github.com/leanote/leanote/conf/app.conf"
      - '/var/log/leanote:/var/log'
      - 'leanote-files:/go/src/github.com/leanote/leanote/files'
    ports:
      - "9000:9000"
    depends_on:
      - mongo

  mongo:
    image: r0wbh/leanote-mongodb:latest
    # build:
    #   context: .
    #   dockerfile: Dockerfile.mongodb
    entrypoint: "/bin/bash"
    command:
      - "/root/start-db.sh"
    healthcheck:
      test: "echo 'db.stats().ok' | mongo 127.0.0.1:27017/leanote --quiet"
    volumes:
      - "leanote-db:/data/db"

volumes:
  leanote-db:
  leanote-files:
